﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/SiteContent.Master" Inherits="System.Web.Mvc.ViewPage<ProjectFitus.Models.SubSite>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Brjostagjof.is | <%=Model.title %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Breyta <%=Model.title %></h2>

    <% using (Html.BeginForm()) {%>
        <%: Html.ValidationSummary(true) %>
        <fieldset>
            <legend>Breyta</legend>
                                
            <div class="editor-label">
                <label for="title">Fyrirsögn:</label>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.title) %>
                <%: Html.ValidationMessageFor(model => model.title) %>
            </div>
            
            <div class="editor-label">
                <label for="contentText">Innihald:</label>
            </div>
            <div class="editor-field">
                <%: Html.TextAreaFor(model => model.contentText) %>
                <script type="text/javascript">                    CKEDITOR.replace('contentText');</script>
                <%: Html.ValidationMessageFor(model => model.contentText) %>
            </div>

            <div class="editor-label">
                <label for="isAvtice">Birta</label>
            </div>
            <div class="editor-field">
                <%: Html.CheckBoxFor(model => model.isActive) %>
                <%: Html.ValidationMessageFor(model => model.isActive) %>
            </div>
            
                      
            <p>
                <%: Html.HiddenFor(model => model.id) %>
                <input type="submit" value="Vista" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%: Html.ActionLink("Til baka", "Details", new { id = Model.id})%> 
    </div>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
    <script src="../../Scripts/MicrosoftAjax.js" type="text/javascript"></script>
    <script src="../../Scripts/MicrosoftMvcValidation.js" type="text/javascript"></script>
    <script type="text/javascript" src="../../Scripts/ckeditor/ckeditor.js"></script>
</asp:Content>

